package com.lyj.model;

import java.util.Set;

/**
* 
* @author 李艺江
* @version 创建时间：2019年5月6日 下午10:06:29
*/

public class User {
	private Integer id;
	private String name;
	private String password;
	private Set<Message> messages;
	private Set<Record> records;

	public User() {
	}

	public User(String name, String password) {
		this.name = name;
		this.password = password;
	}

	
	public User(String name, String password, Set<Message> messages, Set<Record> records) {
		super();
		this.name = name;
		this.password = password;
		this.messages = messages;
		this.records = records;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Set<Message> getMessages() {
		return messages;
	}

	public void setMessages(Set<Message> messages) {
		this.messages = messages;
	}

	public Set<Record> getRecords() {
		return records;
	}

	public void setRecords(Set<Record> records) {
		this.records = records;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

    @Override
    public boolean equals(Object obj) {
    	if(obj == null) {
    		return false;
    	}
        if(this == obj){
            return true;
        }
        if(obj instanceof User) {
        	User user = (User)obj;
        	if(this.id.equals(user.id)) {
        		return true;
        	}
        }
		return false;
    }
}
